package controller.home;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

import view.Home;
import view.Login;

public class LogoutController implements ActionListener{
	private Home home;
	public LogoutController(Home home){
		this.home =home;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
			if(JOptionPane.showConfirmDialog(home, "Do you want to exit?", "Exit", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION){
//				System.exit(0);
				home.setVisible(false);
				Login.getInstance().setVisible(true);
			}else{
				
			}
	}
}
